<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <meta name="description" content="">
    <meta name="author" content="">
    <title>{$list['name']}</title>
    <include file="Template/head"/>
    <style>
        .detail-bottom a i {
            background: rgba(0, 0, 0, 0) url("http://cdn.lydlr.com/public/kangtai/images/detail-icon.png") no-repeat scroll 0 -496px / 40px auto;
            display: inline-block;
            height: 26px;
            margin-right: 5px;
            position: relative;
            top: 8px;
            width: 25px;
        }
    </style>
    <?php
require_once "./App/Home/Common/jssdk.php";
$jssdk = new JSSDK("wx50158a5e179525ab", "d4065289c8314cbb82bb64d58eda674b");
$signPackage = $jssdk->GetSignPackage();
    ?>
<body>
<div class="actNav">
    <div class="doRefresh">线路详情</div>
    <a href="javascript:history.go(-1);" class="back"></a>
    <a href="{:U('Index/index')}" class="home"></a>
</div>

<div class="wapper detailPage">
    <form method="post" action="{:U('Agency/details',array('id'=>$list['id']))}">
        <input type="hidden" name="id" id="id" value="{$list.id}">
        <input id="doRecommend" type="hidden" value="{:U('Agency/recommend')}"/>

        <div class="module">
            <h1 class="title" style="padding:10px;overflow:visible;height:auto;line-height:25px;">{$list.name}</h1>

            <div class="price clearfix" style="border-bottom: 0px">
                <span class="w pull-left">
                    代码：<b><span style='color:#0564ac;font-size: 20px;'>10{$list.id}</span>
                    (在首页搜索该代码可直达本页)</b>
                </span>
            </div>
            <if condition="$Think.session.isLogin eq yes">
                <div class="price clearfix" style="border-bottom: 0px">
                    <span class="w pull-left">
                          供应商：<b>{$list.provider_name}</b>
                    </span>
                </div>
                <div class="price clearfix" style="border-bottom: 0px">
                    <span class="w pull-left">
                          联系人：<b>{$list.contact_person}</b>
                    </span>
                </div>
            </if>
            <div class="price clearfix">
                <span class="w pull-left">
                    价　格：<dfn>&yen;{$list.min_price|getYuan}</dfn>起
                </span>
                <if condition="$Think.session.isLogin eq yes">
                    <a href="{:U('Agency/changePrice',array('id'=>$list['id']))}" class="btn btn-warning pull-right">
                        改价
                    </a>
                </if>
            </div>


            <div class="price clearfix" style='border-top:0px'>
                <if condition="($Think.session.isLogin neq yes) and ($cruiseArr['0'] neq '')">

                    <div>
                        <select class="form-control start_time" name="start_time">
                            <empty name="tourSkuDate">
                                <option value="">暂无班期</option>
                                <else/>
                                <volist name="tourSkuDate" id="vo">
                                    <option value="{$vo.start_time}">
                                        {$vo.start_time}&nbsp;&nbsp;&nbsp;
                                    </option>
                                </volist>
                            </empty>
                        </select>
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>房型</th>
                            <th>市场价</th>

                        </tr>
                        </thead>
                        <volist name="cruiseArr" id="vo" key="k">
                            <tbody class="cruiseId">
                            <volist name="vo" id='v'>
                                <tr>
                                    <td>{$v.0}&nbsp;{$v.1}</td>
                                    <td>{$v.2}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </volist>
                    </table>

                    <elseif condition="($Think.session.isLogin eq yes) and ($cruiseArr['0'] neq '')"/>
                    <div>
                        <select class="form-control start_time" name="start_time">
                            <empty name="tourSkuDate">
                                <option value="">暂无班期</option>
                                <else/>
                                <volist name="tourSkuDate" id="vo">
                                    <option value="{$vo.start_time}">
                                        {$vo.start_time}&nbsp;&nbsp;&nbsp;
                                    </option>
                                </volist>
                            </empty>
                        </select>
                    </div>
                    <table class="table table-striped">
                        <thead>
                        <tr>
                            <th>房型</th>
                            <th>市场价</th>
                            <th>同行价</th>
                        </tr>
                        </thead>
                        <volist name="cruiseArr" id="vo" key="k">
                            <tbody class="cruiseId">
                            <volist name="vo" id='v'>
                                <tr>
                                    <td>{$v.0}&nbsp;{$v.1}</td>
                                    <td>{$v.2}</td>
                                    <td>{$v.3}</td>
                                </tr>
                            </volist>
                            </tbody>
                        </volist>
                    </table>

                    <elseif condition="($Think.session.isLogin eq yes) and ($cruiseArr['0'] eq '')"/>
                    <div class="module blockItem">
                        <div class="t" data-event-trigger><i class="icon i-5"></i>出团班期<span class="arrow"></span></div>
                        <div class="con pad">

                            <select class="form-control" name="start_time">
                                <empty name="tourSkuDate">
                                    <option value="">暂无班期</option>
                                    <else/>
                                    <volist name="tourSkuDate" id="vo">
                                        <option value="{$vo.start_time}">
                                            {$vo.start_time}&nbsp;&nbsp;&nbsp;零售价&yen;{$vo.price_adult_list|getYuan} 同行价&yen;{$vo.price_adult_agency|GetYuan}
                                        </option>
                                    </volist>
                                </empty>
                            </select>
                        </div>
                    </div>

                    <elseif condition="($Think.session.isLogin neq yes) and ($cruiseArr['0'] eq '')"/>
                    <div class="module blockItem">
                        <div class="t" data-event-trigger><i class="icon i-5"></i>出团班期<span class="arrow"></span></div>
                        <div class="con pad">

                            <select class="form-control" name="start_time">
                                <empty name="tourSkuDate">
                                    <option value="">暂无班期</option>
                                    <else/>
                                    <volist name="tourSkuDate" id="vo">
                                        <option value="{$vo.start_time}">
                                            {$vo.start_time}&nbsp;&nbsp;&nbsp;&yen;{$vo.price_adult_list|GetYuan}
                                        </option>
                                    </volist>
                                </empty>
                            </select>
                        </div>
                    </div>
                </if>
            </div>


            <ul class="list">
                <li><label><i class="icon i-1"></i>出发城市：</label>&nbsp;{$departure}</li>
                <li><label><i class="icon" style="background-position: 0 -615px;"></i> 目 的 地 ：</label>&nbsp;{$list.destinations}
                </li>
                <li><label><i class="icon i-2"></i>行程天数：</label>&nbsp;
                    <if condition="$totalDay neq 0">
                        {$totalDay}
                        <else/>
                        &nbsp;
                    </if>
                </li>
                <li><label><i class="icon i-3"></i>出发交通：</label>&nbsp;{$list.traffic_go}</li>
                <li><label><i class="icon i-4"></i>返程交通：</label>&nbsp;{$list.traffic_back}</li>
            </ul>
        </div>

        <div class="module gallery">
            <ul class="act clearfix">
                <if condition="$Think.session.isLogin eq yes">
                    <li class="icon i-3" id="msg">
                        <a id="recommend" href="javascript:void(0);">
                            <i></i><span class="w">推到首页</span>
                        </a>
                    </li>
                </if>
            </ul>
            <if condition="$list['pics'] neq ''">
                <ul class="imglist clearfix">
                    <volist name="picArr" id="vo" offset="0" length='3'>
                        <li>
                            <a href="{:U('Agency/morePics',array('id'=>$list['id']))}"><img src="{$vo}"/></a>
                        </li>
                    </volist>
                </ul>
                <a href="{:U('Agency/morePics',array('id'=>$list['id']))}" class="more">更多图片</a>
                <else/>
            </if>
        </div>

        <div class="module blockItem">
            <div class="t" data-event-trigger><i class="icon i-1"></i>行程安排<span class="arrow"></span></div>
            <div class="con">
                <if condition="$tour_description neq ''">
                    <volist name="tour_description" id="vo">
                        <div class="box">

                            <label class="lab">第{$i}天</label>

                            <p>
                            <pre style="background-color: white;white-space:pre-wrap;border:0">{$vo.description}</pre>
                            </p>
                            <div class="pie clearfix">
                                  <span class="it pull-left"><label><i class="food"></i>用餐：</label>
                                        <if condition="$vo['dining'] eq '2,3'">
                                            中,晚
                                            <elseif condition="$vo['dining'] eq '1,3'"/>
                                            早,晚
                                            <elseif condition="$vo['dining'] eq '1,2'"/>
                                            早,中
                                            <elseif condition="$vo['dining'] eq '1,2,3'"/>
                                            早,中,晚
                                            <elseif condition="$vo['dining'] eq '1'"/>
                                            早
                                            <elseif condition="$vo['dining'] eq '2'"/>
                                            中
                                            <elseif condition="$vo['dining'] eq '3'"/>
                                            晚
                                            <elseif condition="$vo['dining'] eq ''"/>
                                            自理

                                        </if>
                                  </span>

                                  <span class="it pull-right"><label><i
                                          class="hotel"></i>酒店：</label>
                                        <a href="javascript:void(0)" data-toggle="tooltip"
                                           data-placement="top" title="{$vo.hotel}">{$vo.hotel}</a>
                                  </span>
                            </div>

                        </div>
                    </volist>
                    <else/>
                </if>
            </div>
        </div>
        <div class="module blockItem">
            <div class="t" data-event-trigger><i class="icon i-2"></i>路线特色<span class="arrow"></span></div>
            <div class="con pad">
                <p>{$list.description}</p>
            </div>
        </div>
        <div class="module blockItem">
            <div class="t" data-event-trigger><i class="icon i-3"></i>费用说明<span class="arrow"></span></div>
            <div class="con pad">
                <p><label class="lab">费用包含</label>{$list.fee_include}</p>

                <p><label class="lab">费用不包含</label>{$list.fee_exclude}</p>
            </div>
        </div>
        <div class="module blockItem">
            <div class="t" data-event-trigger><i class="icon i-4"></i>注意事项<span class="arrow"></span></div>
            <div class="con pad">
                <p>{$list.notice}</p>
            </div>
        </div>

        <div class="detail-bottom clearfix">

            <if condition="$Think.session.isLogin eq yes">
                <a href="tel:{$tourList.contact_phone}"><i></i>电话咨询</a>
                <else/>
                <a href="tel:{$userInfo.mobile}" style="width: 100%" class="yd"><i></i>电话咨询</a>
            </if>

            <if condition="$Think.session.isLogin eq yes">
                <if condition="$tourSku[0]['cruise'] eq ''">
                    <a href="{:U('Agency/orderInfo',array('id'=>$list['id']))}" class="yd">
                        立即预订
                    </a>
                    <else/>
                    <a href="{:U('Agency/orderCruiseInfo',array('id'=>$list['id']))}" class="yd">
                        立即预订
                    </a>
                </if>
                <else/>
            </if>
        </div>
        <div class="modal fade popWin bs-example-modal-sm" id="myModalSuc" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body text-center">
                        <p class="tipsBox"><i class="suc"></i>推荐成功</p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-warning" data-dismiss="modal" aria-label="Close">确认
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">取消
                        </button>
                    </div>
                </div>
            </div>
        </div>

        <div class="modal fade popWin bs-example-modal-sm" id="myModalAuc" tabindex="-1" role="dialog"
             aria-labelledby="myModalLabel" aria-hidden="true">
            <div class="modal-dialog modal-sm">
                <div class="modal-content">
                    <div class="modal-header">
                        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                                aria-hidden="true">&times;</span></button>
                        <h4 class="modal-title" id="myModalLabel">提示</h4>
                    </div>
                    <div class="modal-body text-center">
                        <p class="tipsBox"><i class="suc"></i></p>
                    </div>
                    <div class="modal-footer">
                        <button type="button" class="btn btn-warning" data-dismiss="modal" aria-label="Close">确认
                        </button>
                        <button type="button" class="btn btn-default" data-dismiss="modal" aria-label="Close">取消
                        </button>
                    </div>
                </div>
            </div>
        </div>
        <footer class="footer">
            <include file="Template/foot"/>
        </footer>
    </form>
</div>

<script type="text/javascript">
    $(function () {
        $("[data-toggle='tooltip']").tooltip();
    });

    wx.config({
        debug: false,
        appId: '<?php echo $signPackage["appId"];?>',
        timestamp: '<?php echo $signPackage["timestamp"]; ?>',
        nonceStr: '<?php echo $signPackage["nonceStr"];?>',
        signature: '<?php echo $signPackage["signature"];?>',
        jsApiList: [
            'onMenuShareTimeline',
            'onMenuShareAppMessage',
            'onMenuShareQQ',
        ]
    });

    wx.ready(function () {
        var shareData = {
            desc: "{$list.name}",
            title: "{$list.name}",
            link: "{$domain}",
            imgUrl: '{$bgImg}',
        };
        wx.onMenuShareTimeline(shareData);
        wx.onMenuShareAppMessage(shareData);
        wx.onMenuShareQQ(shareData);
    });

</script>
</body>
</html>
